﻿namespace NEvoWeb.Modules.NB_Store
{
    using DotNetNuke.Common;
    using DotNetNuke.Common.Utilities;
    using DotNetNuke.Entities.Modules;
    using DotNetNuke.Services.Exceptions;
    using DotNetNuke.Services.Localization;
    using DotNetNuke.UI.UserControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections;
    using System.IO;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class AdminCategories : BaseAdminModule
    {
        [AccessedThroughProperty("cmdAdd")]
        private LinkButton _cmdAdd;
        [AccessedThroughProperty("cmdAddImage")]
        private LinkButton _cmdAddImage;
        [AccessedThroughProperty("cmdBrowse")]
        private FileUpload _cmdBrowse;
        [AccessedThroughProperty("cmdCancel")]
        private LinkButton _cmdCancel;
        [AccessedThroughProperty("cmdClearProducts")]
        private LinkButton _cmdClearProducts;
        [AccessedThroughProperty("cmdCopyProd")]
        private LinkButton _cmdCopyProd;
        [AccessedThroughProperty("cmdDelete")]
        private LinkButton _cmdDelete;
        [AccessedThroughProperty("cmdEditProducts")]
        private LinkButton _cmdEditProducts;
        [AccessedThroughProperty("cmdMoveProd")]
        private LinkButton _cmdMoveProd;
        [AccessedThroughProperty("cmdRemove")]
        private LinkButton _cmdRemove;
        [AccessedThroughProperty("cmdSelectProducts")]
        private LinkButton _cmdSelectProducts;
        [AccessedThroughProperty("cmdUpdate")]
        private LinkButton _cmdUpdate;
        private string _CtlKey;
        [AccessedThroughProperty("ctlPagingControl")]
        private AdminPagingControl _ctlPagingControl;
        private int _CurrentPage;
        [AccessedThroughProperty("chkArchived")]
        private CheckBox _chkArchived;
        [AccessedThroughProperty("chkHide")]
        private CheckBox _chkHide;
        [AccessedThroughProperty("ddlListAltItemTemplate")]
        private DropDownList _ddlListAltItemTemplate;
        [AccessedThroughProperty("ddlListItemTemplate")]
        private DropDownList _ddlListItemTemplate;
        [AccessedThroughProperty("ddlMoveProd")]
        private DropDownList _ddlMoveProd;
        [AccessedThroughProperty("ddlParentCategory")]
        private DropDownList _ddlParentCategory;
        [AccessedThroughProperty("ddlProductTemplate")]
        private DropDownList _ddlProductTemplate;
        [AccessedThroughProperty("dgProducts")]
        private DataGrid _dgProducts;
        [AccessedThroughProperty("divCatSelect")]
        private HtmlGenericControl _divCatSelect;
        [AccessedThroughProperty("divMsgBox")]
        private HtmlGenericControl _divMsgBox;
        [AccessedThroughProperty("dshMsgBox")]
        private UserControl _dshMsgBox;
        [AccessedThroughProperty("imgCat")]
        private Image _imgCat;
        [AccessedThroughProperty("labelArchived")]
        private UserControl _labelArchived;
        [AccessedThroughProperty("labelCategoryDescription")]
        private UserControl _labelCategoryDescription;
        [AccessedThroughProperty("labelCategoryName")]
        private UserControl _labelCategoryName;
        [AccessedThroughProperty("labelHide")]
        private UserControl _labelHide;
        [AccessedThroughProperty("labelMessage")]
        private UserControl _labelMessage;
        [AccessedThroughProperty("labelMetaDescription")]
        private UserControl _labelMetaDescription;
        [AccessedThroughProperty("labelMetaKeywords")]
        private UserControl _labelMetaKeywords;
        [AccessedThroughProperty("labelOrder")]
        private UserControl _labelOrder;
        [AccessedThroughProperty("labelParentCategory")]
        private UserControl _labelParentCategory;
        [AccessedThroughProperty("labelSEOName")]
        private UserControl _labelSEOName;
        [AccessedThroughProperty("labelSEOPageTitle")]
        private UserControl _labelSEOPageTitle;
        [AccessedThroughProperty("lbCategory")]
        private ListBox _lbCategory;
        [AccessedThroughProperty("lblErrorDelete")]
        private Label _lblErrorDelete;
        [AccessedThroughProperty("lblExtra")]
        private Label _lblExtra;
        [AccessedThroughProperty("lblGeneral")]
        private Label _lblGeneral;
        [AccessedThroughProperty("lblProducts")]
        private Label _lblProducts;
        [AccessedThroughProperty("lblRecursionWarning")]
        private Label _lblRecursionWarning;
        [AccessedThroughProperty("lblSEO")]
        private Label _lblSEO;
        [AccessedThroughProperty("plListAltItemTemplate")]
        private UserControl _plListAltItemTemplate;
        [AccessedThroughProperty("plListItemTemplate")]
        private UserControl _plListItemTemplate;
        [AccessedThroughProperty("plProductTemplate")]
        private UserControl _plProductTemplate;
        [AccessedThroughProperty("pnlCategory")]
        private Panel _pnlCategory;
        [AccessedThroughProperty("pnlEdit")]
        private Panel _pnlEdit;
        [AccessedThroughProperty("pnlList")]
        private Panel _pnlList;
        [AccessedThroughProperty("productlist")]
        private AdminProductList _productlist;
        [AccessedThroughProperty("phCatID")]
        private PlaceHolder _phCatID;
        protected bool _Related;
        [AccessedThroughProperty("selectlang")]
        private SelectLang _selectlang;
        [AccessedThroughProperty("ShowSelectLang")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang;
        [AccessedThroughProperty("ShowSelectLang1")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang1;
        [AccessedThroughProperty("ShowSelectLang2")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang2;
        [AccessedThroughProperty("ShowSelectLang3")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang3;
        [AccessedThroughProperty("ShowSelectLang4")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang4;
        [AccessedThroughProperty("ShowSelectLang5")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang5;
        [AccessedThroughProperty("ShowSelectLang6")]
        private NEvoWeb.Modules.NB_Store.ShowSelectLang _ShowSelectLang6;
        private string _SkinSrc;
        [AccessedThroughProperty("tabs")]
        private HtmlGenericControl _tabs;
        [AccessedThroughProperty("txtCategoryName")]
        private TextBox _txtCategoryName;
        [AccessedThroughProperty("txtDescription")]
        private TextBox _txtDescription;
        [AccessedThroughProperty("txtMessage")]
        private UserControl _txtMessage;
        [AccessedThroughProperty("txtMetaDescription")]
        private TextBox _txtMetaDescription;
        [AccessedThroughProperty("txtMetaKeywords")]
        private TextBox _txtMetaKeywords;
        [AccessedThroughProperty("txtOrder")]
        private TextBox _txtOrder;
        [AccessedThroughProperty("txtSEOName")]
        private TextBox _txtSEOName;
        [AccessedThroughProperty("txtSEOPageTitle")]
        private TextBox _txtSEOPageTitle;
        [AccessedThroughProperty("validatorOrder")]
        private CompareValidator _validatorOrder;
        [AccessedThroughProperty("validatorRequireOrder")]
        private RequiredFieldValidator _validatorRequireOrder;
        [AccessedThroughProperty("valReqCategoryName")]
        private RequiredFieldValidator _valReqCategoryName;

        public AdminCategories()
        {
            base.Load += new EventHandler(this.Page_Load);
            base.Init += new EventHandler(this.Page_Init1);
            this._CtlKey = "";
            this._CurrentPage = 1;
            this._SkinSrc = "";
            this._Related = false;
        }

        private void cmdAdd_Click(object sender, EventArgs e)
        {
            try
            {
                SharedFunctions.setAdminCookieValue(this.PortalId, "CatID", "0");
                this.Response.Redirect(this.EditUrl(this._CtlKey), true);
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void cmdAddImage_Click(object sender, EventArgs e)
        {
            int imageSize = 450;
            SettingsController controller = new SettingsController();
            NB_Store_SettingsInfo info2 = controller.GetSetting(this.PortalId, "image.resize", "None");
            if ((info2 != null) && Versioned.IsNumeric(info2.SettingValue))
            {
                if (Conversions.ToInteger(info2.SettingValue) >= 50)
                {
                    imageSize = Conversions.ToInteger(info2.SettingValue);
                }
                else
                {
                    imageSize = 0;
                }
            }
            int imageQuality = 0x55;
            info2 = controller.GetSetting(this.PortalId, "image.quality", "None");
            if ((info2 != null) && Versioned.IsNumeric(info2.SettingValue))
            {
                imageQuality = Conversions.ToInteger(info2.SettingValue);
            }
            int interpolationMode = 7;
            int smoothingMode = 2;
            int pixelOffsetMode = 0;
            int compositingQuality = 0;
            info2 = controller.GetSetting(this.PortalId, "image.advanced", "None");
            if (info2 != null)
            {
                string[] strArray = info2.SettingValue.Split(new char[] { ',' });
                if (strArray.GetUpperBound(0) == 3)
                {
                    if (Versioned.IsNumeric(strArray[0]))
                    {
                        interpolationMode = Conversions.ToInteger(strArray[0]);
                    }
                    if (Versioned.IsNumeric(strArray[1]))
                    {
                        smoothingMode = Conversions.ToInteger(strArray[1]);
                    }
                    if (Versioned.IsNumeric(strArray[2]))
                    {
                        pixelOffsetMode = Conversions.ToInteger(strArray[2]);
                    }
                    if (Versioned.IsNumeric(strArray[3]))
                    {
                        compositingQuality = Conversions.ToInteger(strArray[3]);
                    }
                }
            }
            NB_Store_CategoriesInfo info = this.updateCategory();
            this.UploadImage(info.CategoryID, this.selectlang.SelectedLang, imageSize, imageQuality, interpolationMode, smoothingMode, pixelOffsetMode, compositingQuality);
            this.populateEdit();
        }

        private void cmdCancel_Click(object sender, EventArgs e)
        {
            try
            {
                SharedFunctions.setAdminCookieValue(this.PortalId, "CatID", "-1");
                this.Response.Redirect(this.EditUrl(this._CtlKey), true);
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void cmdClearProducts_Click(object sender, EventArgs e)
        {
            new CategoryController().ClearCategory(this.getCookieCatID());
            this.populateEdit();
        }

        private void cmdCopyProd_Click(object sender, EventArgs e)
        {
            new CategoryController().MoveCategoryProducts(this.getCookieCatID(), Conversions.ToInteger(this.ddlMoveProd.SelectedValue), false);
            this.populateEdit();
        }

        private void cmdDelete_Click(object sender, EventArgs e)
        {
            try
            {
                CategoryController controller = new CategoryController();
                if (controller.DependantExists(this.PortalId, SharedFunctions.GetCurrentCulture(), this.getCookieCatID()))
                {
                    this.lblErrorDelete.Visible = true;
                }
                else
                {
                    this.lblErrorDelete.Visible = false;
                    controller.DeleteCategories(this.getCookieCatID());
                    this.Response.Redirect(this.EditUrl(this._CtlKey), true);
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void cmdEditProducts_Click(object sender, EventArgs e)
        {
            this.updateCategory();
            this.Response.Redirect(this.EditUrl("CatID", this.getCookieCatID().ToString(), "AdminProduct"), true);
        }

        private void cmdMoveProd_Click(object sender, EventArgs e)
        {
            new CategoryController().MoveCategoryProducts(this.getCookieCatID(), Conversions.ToInteger(this.ddlMoveProd.SelectedValue), true);
            this.populateEdit();
        }

        private void cmdRemove_Click(object sender, EventArgs e)
        {
            try
            {
                CategoryController controller = new CategoryController();
                NB_Store_CategoriesInfo category = controller.GetCategory(this.getCookieCatID(), SharedFunctions.GetCurrentCulture());
                if (category != null)
                {
                    category.ImageURL = "";
                    controller.UpdateObjCategories(category);
                }
                this.populateEdit();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void cmdSelectProducts_Click(object sender, EventArgs e)
        {
            this.updateCategory();
            SharedFunctions.setUrlCookieInfo(this.PortalId, this.Request);
            SharedFunctions.setAdminCookieValue(this.PortalId, "ProdID", this.getCookieCatID().ToString());
            this.Response.Redirect(this.EditUrl("rel", "1", this._CtlKey), true);
        }

        private void cmdUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                NB_Store_CategoriesInfo info = this.updateCategory();
                SharedFunctions.populateCategoryTextList(this.PortalSettings.PortalId, this.lbCategory, "", "", Conversions.ToString(-1));
                this.populateEdit();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void dgProducts_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            if (e.CommandName == "Remove")
            {
                DataGridItem item = e.Item;
                int productID = int.Parse(e.CommandArgument.ToString());
                new ProductController().DeleteProductCategory(productID, this.getCookieCatID());
                this.populateEdit();
            }
        }

        private void dgProducts_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            DataGridItem item = e.Item;
            if (((item.ItemType == ListItemType.Item) | (item.ItemType == ListItemType.AlternatingItem)) | (item.ItemType == ListItemType.SelectedItem))
            {
                Control control = item.Controls[3].Controls[0];
                if (control is ImageButton)
                {
                    ImageButton button = (ImageButton) control;
                    button.Attributes.Add("onClick", "javascript:return confirm('" + DotNetNuke.Services.Localization.Localization.GetString("cmdRemoveFromCatMsg", this.LocalResourceFile) + "');");
                    button.ToolTip = DotNetNuke.Services.Localization.Localization.GetString("cmdRemove", this.LocalResourceFile);
                }
            }
        }

        private int getCookieCatID()
        {
            string expression = SharedFunctions.getAdminCookieValue(this.PortalId, "CatID");
            if (Versioned.IsNumeric(expression))
            {
                return Conversions.ToInteger(expression);
            }
            return -1;
        }

        private void lbCategory_SelectedIndexChanged(object sender, EventArgs e)
        {
            if ((this.lbCategory.SelectedValue != "-1") & Versioned.IsNumeric(this.lbCategory.SelectedValue))
            {
                SharedFunctions.setAdminCookieValue(this.PortalId, "CatID", this.lbCategory.SelectedValue.ToString());
                this.Response.Redirect(this.EditUrl(this._CtlKey), true);
            }
        }

        private void Page_Init1(object sender, EventArgs e)
        {
            this.productlist.AddRelated += new AdminProductList.AddRelatedEventHandler(this.productlist_AddRelated);
            this.productlist.ReturnButton += new AdminProductList.ReturnButtonEventHandler(this.productlist_ReturnButton);
            this._CurrentPage = 1;
            if ((this.Request.QueryString["currentpage"] != null) && Versioned.IsNumeric(this.Request.QueryString["currentpage"]))
            {
                this._CurrentPage = Conversions.ToInteger(this.Request.QueryString["currentpage"]);
            }
            this._SkinSrc = "";
            if (this.Request.QueryString["SkinSrc"] != null)
            {
                this._SkinSrc = this.Request.QueryString["SkinSrc"];
            }
            this._Related = false;
            if ((this.Request.QueryString["rel"] != null) && (this.Request.QueryString["rel"] == "1"))
            {
                this._Related = true;
            }
            this._CtlKey = "";
            if (this.Request.QueryString["ctl"] != null)
            {
                this._CtlKey = this.Request.QueryString["ctl"];
            }
        }

        private void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.Page.IsPostBack)
                {
                    if (this._Related)
                    {
                        this.populateList();
                    }
                    else
                    {
                        this.pnlList.Visible = false;
                        this.cmdDelete.Attributes.Add("onClick", "javascript:return confirm('" + DotNetNuke.Services.Localization.Localization.GetString("DeleteItem", this.LocalResourceFile) + "');");
                        this.cmdClearProducts.Attributes.Add("onClick", "javascript:return confirm('" + DotNetNuke.Services.Localization.Localization.GetString("cmdClearProductsMsg", this.LocalResourceFile) + "');");
                        this.cmdMoveProd.Attributes.Add("onClick", "javascript:return confirm('" + DotNetNuke.Services.Localization.Localization.GetString("cmdMoveProdMsg", this.LocalResourceFile) + "');");
                        this.cmdCopyProd.Attributes.Add("onClick", "javascript:return confirm('" + DotNetNuke.Services.Localization.Localization.GetString("cmdCopyProdMsg", this.LocalResourceFile) + "');");
                        this.divCatSelect.Visible = true;
                        this.pnlEdit.Visible = false;
                        int num = this.getCookieCatID();
                        SharedFunctions.populateCategoryTextList(this.PortalSettings.PortalId, this.lbCategory, "", "", num.ToString());
                        if (num >= 0)
                        {
                            this.populateEdit();
                        }
                    }
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exc = exception1;
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException((PortalModuleBase) this, exc);
                ProjectData.ClearProjectError();
            }
        }

        private void populateEdit()
        {
            CategoryController controller = new CategoryController();
            int categoryID = this.getCookieCatID();
            this.phCatID.Controls.Add(new LiteralControl("CatID : " + categoryID.ToString()));
            this.pnlEdit.Visible = true;
            this.pnlCategory.Visible = true;
            this.pnlList.Visible = false;
            NB_Store_CategoriesInfo category = controller.GetCategory(categoryID, this.selectlang.SelectedLang);
            if (category != null)
            {
                SharedFunctions.populateCategoryList(this.PortalId, this.ddlParentCategory, "", "", Conversions.ToString(category.ParentCategoryID));
            }
            else
            {
                SharedFunctions.populateCategoryList(this.PortalId, this.ddlParentCategory);
            }
            SharedFunctions.populateCategoryList(this.PortalId, this.ddlMoveProd);
            ListItem item = new ListItem {
                Value = "0",
                Text = DotNetNuke.Services.Localization.Localization.GetString("None", this.LocalResourceFile)
            };
            this.ddlParentCategory.Items.Insert(0, item);
            SharedFunctions.populateTemplateList(this.PortalId, this.ddlProductTemplate, ".template", "", "", "");
            SharedFunctions.populateTemplateList(this.PortalId, this.ddlListItemTemplate, ".template", "", "", "");
            SharedFunctions.populateTemplateList(this.PortalId, this.ddlListAltItemTemplate, ".template", "", "", "");
            item = new ListItem {
                Value = "",
                Text = DotNetNuke.Services.Localization.Localization.GetString("Default", this.LocalResourceFile)
            };
            this.ddlProductTemplate.Items.Insert(0, item);
            item = new ListItem {
                Value = "",
                Text = DotNetNuke.Services.Localization.Localization.GetString("Default", this.LocalResourceFile)
            };
            this.ddlListItemTemplate.Items.Insert(0, item);
            item = new ListItem {
                Value = "",
                Text = DotNetNuke.Services.Localization.Localization.GetString("Default", this.LocalResourceFile)
            };
            this.ddlListAltItemTemplate.Items.Insert(0, item);
            this.ShowSelectLang.Refresh();
            this.ShowSelectLang1.Refresh();
            this.ShowSelectLang2.Refresh();
            this.ShowSelectLang3.Refresh();
            this.ShowSelectLang4.Refresh();
            this.ShowSelectLang5.Refresh();
            this.ShowSelectLang6.Refresh();
            if (category != null)
            {
                if (this.ddlParentCategory.Items.FindByValue(Conversions.ToString(category.ParentCategoryID)) != null)
                {
                    this.ddlParentCategory.ClearSelection();
                    this.ddlParentCategory.Items.FindByValue(Conversions.ToString(category.ParentCategoryID)).Selected = true;
                }
                if (this.ddlProductTemplate.Items.FindByValue(category.ProductTemplate) != null)
                {
                    this.ddlProductTemplate.ClearSelection();
                    this.ddlProductTemplate.Items.FindByValue(category.ProductTemplate).Selected = true;
                }
                if (this.ddlListItemTemplate.Items.FindByValue(category.ListItemTemplate) != null)
                {
                    this.ddlListItemTemplate.ClearSelection();
                    this.ddlListItemTemplate.Items.FindByValue(category.ListItemTemplate).Selected = true;
                }
                if (this.ddlListAltItemTemplate.Items.FindByValue(category.ListAltItemTemplate) != null)
                {
                    this.ddlListAltItemTemplate.ClearSelection();
                    this.ddlListAltItemTemplate.Items.FindByValue(category.ListAltItemTemplate).Selected = true;
                }
                this.txtCategoryName.Text = category.CategoryName;
                this.txtDescription.Text = category.CategoryDesc;
                ((TextEditor) this.txtMessage).Text = category.Message;
                this.txtOrder.Text = Conversions.ToString(category.ListOrder);
                this.chkArchived.Checked = category.Archived;
                this.chkHide.Checked = category.Hide;
                this.txtSEOName.Text = category.SEOName;
                this.txtSEOPageTitle.Text = category.SEOPageTitle;
                this.txtMetaDescription.Text = category.MetaDescription;
                this.txtMetaKeywords.Text = category.MetaKeywords;
                if (category.ImageURL == "")
                {
                    this.cmdAddImage.Visible = true;
                    this.cmdBrowse.Visible = true;
                    this.cmdRemove.Visible = false;
                    this.imgCat.Visible = false;
                }
                else
                {
                    this.cmdAddImage.Visible = false;
                    this.cmdBrowse.Visible = false;
                    this.cmdRemove.Visible = true;
                    this.imgCat.Visible = true;
                    this.imgCat.ImageUrl = base.StoreInstallPath + "makethumbnail.ashx?Image=" + DotNetNuke.Common.Globals.QueryStringEncode(@"productimages\" + Path.GetFileName(category.ImageURL)) + "&w=100&tabid=" + Conversions.ToString(this.TabId);
                }
            }
            else
            {
                this.cmdAddImage.Visible = true;
                this.cmdBrowse.Visible = true;
                this.cmdRemove.Visible = false;
                this.imgCat.Visible = false;
            }
            if (this.txtOrder.Text == "")
            {
                this.txtOrder.Text = "1";
            }
            if (categoryID > 0)
            {
                ProductController controller2 = new ProductController();
                int pageSize = this.dgProducts.PageSize;
                ArrayList list = controller2.GetProductList(this.PortalSettings.PortalId, categoryID, SharedFunctions.GetCurrentCulture(), "", false, this._CurrentPage, pageSize, false, true);
                int num2 = controller2.GetProductListSize(this.PortalSettings.PortalId, categoryID, SharedFunctions.GetCurrentCulture(), "", false, false, false, true, "", false);
                this.dgProducts.DataSource = list;
                this.dgProducts.DataBind();
                this.dgProducts.DataSource = list;
                this.dgProducts.DataBind();
                this.ctlPagingControl.QuerystringParams = "ctl=" + this._CtlKey + "&mid=" + Conversions.ToString(this.ModuleId);
                this.ctlPagingControl.TotalRecords = num2;
                this.ctlPagingControl.PageSize = pageSize;
                this.ctlPagingControl.CurrentPage = this._CurrentPage;
                this.ctlPagingControl.TabID = this.PortalSettings.ActiveTab.TabID;
                this.ctlPagingControl.BorderWidth = 0;
                this.ctlPagingControl.SkinSrc = this._SkinSrc;
                if ((num2 <= pageSize) | (pageSize == -1))
                {
                    this.ctlPagingControl.Visible = false;
                }
                else
                {
                    this.ctlPagingControl.Visible = true;
                }
            }
        }

        private void populateList()
        {
            this.pnlList.Visible = true;
            this.pnlCategory.Visible = false;
            this.productlist.populateList();
        }

        private void productlist_AddRelated(int CategoryID, int RelatedID)
        {
            new ProductController().UpdateProductCategory(RelatedID, CategoryID);
        }

        private void productlist_ReturnButton(object sender, EventArgs e)
        {
            this.Response.Redirect(this.EditUrl(this._CtlKey), true);
        }

        private void selectlang_AfterChange(object source, DataListCommandEventArgs e, string PreviousEditLang)
        {
            if (e.CommandName == "Change")
            {
                this.populateEdit();
            }
        }

        private void selectlang_BeforeChange(object source, DataListCommandEventArgs e, string NewEditLang)
        {
            if (e.CommandName == "Change")
            {
                NB_Store_CategoriesInfo info = new NB_Store_CategoriesInfo();
                info = this.updateCategory();
            }
        }

        private NB_Store_CategoriesInfo updateCategory()
        {
            CategoryController controller = new CategoryController();
            NB_Store_CategoriesInfo objInfo = new NB_Store_CategoriesInfo();
            int categoryID = this.getCookieCatID();
            if ((categoryID > 0) & (categoryID == Conversions.ToDouble(this.ddlParentCategory.SelectedValue)))
            {
                this.lblRecursionWarning.Visible = true;
                return null;
            }
            objInfo = controller.GetCategory(categoryID, SharedFunctions.GetCurrentCulture());
            if (objInfo == null)
            {
                objInfo = new NB_Store_CategoriesInfo();
            }
            Collection collection = new Collection();
            string selectedValue = this.ddlParentCategory.SelectedValue;
            if ((categoryID > 0) && controller.GetSubCategoryCollection(this.PortalId, categoryID).Contains(selectedValue))
            {
                selectedValue = Conversions.ToString(objInfo.ParentCategoryID);
            }
            this.lblRecursionWarning.Visible = false;
            objInfo.CategoryID = categoryID;
            objInfo.CategoryName = this.txtCategoryName.Text;
            objInfo.CategoryDesc = this.txtDescription.Text;
            objInfo.Message = ((TextEditor) this.txtMessage).Text;
            objInfo.ListOrder = Conversions.ToInteger(this.txtOrder.Text);
            objInfo.CreatedByUser = Conversions.ToString(this.UserId);
            objInfo.CreatedDate = DateAndTime.Now;
            objInfo.Lang = this.selectlang.SelectedLang;
            objInfo.ParentCategoryID = Conversions.ToInteger(selectedValue);
            objInfo.ProductTemplate = this.ddlProductTemplate.SelectedValue;
            objInfo.ListItemTemplate = this.ddlListItemTemplate.SelectedValue;
            objInfo.ListAltItemTemplate = this.ddlListAltItemTemplate.SelectedValue;
            objInfo.PortalID = this.PortalId;
            objInfo.Archived = this.chkArchived.Checked;
            objInfo.Hide = this.chkHide.Checked;
            objInfo.SEOName = this.txtSEOName.Text;
            objInfo.SEOPageTitle = this.txtSEOPageTitle.Text;
            objInfo.MetaDescription = this.txtMetaDescription.Text;
            objInfo.MetaKeywords = this.txtMetaKeywords.Text;
            objInfo = controller.UpdateObjCategories(objInfo);
            SharedFunctions.setAdminCookieValue(this.PortalId, "CatID", objInfo.CategoryID.ToString());
            controller.CopyToLanguages(objInfo, false);
            return objInfo;
        }

        public void UploadImage(int CatID, string Lang, int ImageSize, int ImageQuality = 0x55, int InterpolationMode = 7, int SmoothingMode = 2, int PixelOffsetMode = 0, int CompositingQuality = 0)
        {
            FileSystemUtils utils = new FileSystemUtils();
            CategoryController controller = new CategoryController();
            if (this.cmdBrowse.FileName != "")
            {
                SharedFunctions.RemoveFiles(this.PortalSettings, "temp");
                string str2 = "";
                str2 = "Cat" + Conversions.ToString(CatID) + "_Image" + Path.GetExtension(this.cmdBrowse.FileName);
                SharedFunctions.CreateDir(this.PortalSettings, "temp");
                SharedFunctions.CreateDir(this.PortalSettings, "productimages");
                FileSystemUtils.SaveFile(this.PortalSettings.HomeDirectoryMapPath + @"temp\" + str2, this.cmdBrowse.FileBytes);
                ImgReSize size = new ImgReSize {
                    _ImageQuality = ImageQuality,
                    _InterpolationMode = InterpolationMode,
                    _CompositingQuality = CompositingQuality,
                    _PixelOffsetMode = PixelOffsetMode,
                    _SmoothingMode = SmoothingMode
                };
                string path = "";
                path = size.ResizeImageFile(this.PortalSettings, this.PortalSettings.HomeDirectoryMapPath + "productimages", this.PortalSettings.HomeDirectoryMapPath + @"temp\" + str2, (double) ImageSize);
                NB_Store_CategoriesInfo category = controller.GetCategory(CatID, SharedFunctions.GetCurrentCulture());
                if (category != null)
                {
                    category.ImageURL = this.PortalSettings.HomeDirectory + "productimages/" + Path.GetFileName(path);
                    controller.UpdateObjCategories(category);
                    string str5 = "";
                    str5 = this.PortalSettings.HomeDirectoryMapPath + @"productimages\" + Path.GetFileName(category.ImageURL);
                    DataCache.RemoveCache(str5.Substring(str5.LastIndexOf(@"\Portals\")) + "100x100");
                }
                FileSystemUtils.DeleteFile(this.PortalSettings.HomeDirectoryMapPath + @"temp\" + str2, this.PortalSettings, true);
            }
        }

        protected virtual LinkButton cmdAdd
        {
            get
            {
                return this._cmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdAdd_Click);
                if (this._cmdAdd != null)
                {
                    this._cmdAdd.Click -= handler;
                }
                this._cmdAdd = value;
                if (this._cmdAdd != null)
                {
                    this._cmdAdd.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdAddImage
        {
            get
            {
                return this._cmdAddImage;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdAddImage_Click);
                if (this._cmdAddImage != null)
                {
                    this._cmdAddImage.Click -= handler;
                }
                this._cmdAddImage = value;
                if (this._cmdAddImage != null)
                {
                    this._cmdAddImage.Click += handler;
                }
            }
        }

        protected virtual FileUpload cmdBrowse
        {
            get
            {
                return this._cmdBrowse;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._cmdBrowse = value;
            }
        }

        protected virtual LinkButton cmdCancel
        {
            get
            {
                return this._cmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdCancel_Click);
                if (this._cmdCancel != null)
                {
                    this._cmdCancel.Click -= handler;
                }
                this._cmdCancel = value;
                if (this._cmdCancel != null)
                {
                    this._cmdCancel.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdClearProducts
        {
            get
            {
                return this._cmdClearProducts;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdClearProducts_Click);
                if (this._cmdClearProducts != null)
                {
                    this._cmdClearProducts.Click -= handler;
                }
                this._cmdClearProducts = value;
                if (this._cmdClearProducts != null)
                {
                    this._cmdClearProducts.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdCopyProd
        {
            get
            {
                return this._cmdCopyProd;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdCopyProd_Click);
                if (this._cmdCopyProd != null)
                {
                    this._cmdCopyProd.Click -= handler;
                }
                this._cmdCopyProd = value;
                if (this._cmdCopyProd != null)
                {
                    this._cmdCopyProd.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdDelete
        {
            get
            {
                return this._cmdDelete;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdDelete_Click);
                if (this._cmdDelete != null)
                {
                    this._cmdDelete.Click -= handler;
                }
                this._cmdDelete = value;
                if (this._cmdDelete != null)
                {
                    this._cmdDelete.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdEditProducts
        {
            get
            {
                return this._cmdEditProducts;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdEditProducts_Click);
                if (this._cmdEditProducts != null)
                {
                    this._cmdEditProducts.Click -= handler;
                }
                this._cmdEditProducts = value;
                if (this._cmdEditProducts != null)
                {
                    this._cmdEditProducts.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdMoveProd
        {
            get
            {
                return this._cmdMoveProd;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdMoveProd_Click);
                if (this._cmdMoveProd != null)
                {
                    this._cmdMoveProd.Click -= handler;
                }
                this._cmdMoveProd = value;
                if (this._cmdMoveProd != null)
                {
                    this._cmdMoveProd.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdRemove
        {
            get
            {
                return this._cmdRemove;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdRemove_Click);
                if (this._cmdRemove != null)
                {
                    this._cmdRemove.Click -= handler;
                }
                this._cmdRemove = value;
                if (this._cmdRemove != null)
                {
                    this._cmdRemove.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdSelectProducts
        {
            get
            {
                return this._cmdSelectProducts;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdSelectProducts_Click);
                if (this._cmdSelectProducts != null)
                {
                    this._cmdSelectProducts.Click -= handler;
                }
                this._cmdSelectProducts = value;
                if (this._cmdSelectProducts != null)
                {
                    this._cmdSelectProducts.Click += handler;
                }
            }
        }

        protected virtual LinkButton cmdUpdate
        {
            get
            {
                return this._cmdUpdate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.cmdUpdate_Click);
                if (this._cmdUpdate != null)
                {
                    this._cmdUpdate.Click -= handler;
                }
                this._cmdUpdate = value;
                if (this._cmdUpdate != null)
                {
                    this._cmdUpdate.Click += handler;
                }
            }
        }

        protected virtual AdminPagingControl ctlPagingControl
        {
            get
            {
                return this._ctlPagingControl;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ctlPagingControl = value;
            }
        }

        protected virtual CheckBox chkArchived
        {
            get
            {
                return this._chkArchived;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkArchived = value;
            }
        }

        protected virtual CheckBox chkHide
        {
            get
            {
                return this._chkHide;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._chkHide = value;
            }
        }

        protected virtual DropDownList ddlListAltItemTemplate
        {
            get
            {
                return this._ddlListAltItemTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlListAltItemTemplate = value;
            }
        }

        protected virtual DropDownList ddlListItemTemplate
        {
            get
            {
                return this._ddlListItemTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlListItemTemplate = value;
            }
        }

        protected virtual DropDownList ddlMoveProd
        {
            get
            {
                return this._ddlMoveProd;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlMoveProd = value;
            }
        }

        protected virtual DropDownList ddlParentCategory
        {
            get
            {
                return this._ddlParentCategory;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlParentCategory = value;
            }
        }

        protected virtual DropDownList ddlProductTemplate
        {
            get
            {
                return this._ddlProductTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ddlProductTemplate = value;
            }
        }

        protected virtual DataGrid dgProducts
        {
            get
            {
                return this._dgProducts;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                DataGridItemEventHandler handler = new DataGridItemEventHandler(this.dgProducts_ItemDataBound);
                DataGridCommandEventHandler handler2 = new DataGridCommandEventHandler(this.dgProducts_ItemCommand);
                if (this._dgProducts != null)
                {
                    this._dgProducts.ItemDataBound -= handler;
                    this._dgProducts.ItemCommand -= handler2;
                }
                this._dgProducts = value;
                if (this._dgProducts != null)
                {
                    this._dgProducts.ItemDataBound += handler;
                    this._dgProducts.ItemCommand += handler2;
                }
            }
        }

        protected virtual HtmlGenericControl divCatSelect
        {
            get
            {
                return this._divCatSelect;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._divCatSelect = value;
            }
        }

        protected virtual HtmlGenericControl divMsgBox
        {
            get
            {
                return this._divMsgBox;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._divMsgBox = value;
            }
        }

        protected virtual UserControl dshMsgBox
        {
            get
            {
                return this._dshMsgBox;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._dshMsgBox = value;
            }
        }

        protected virtual Image imgCat
        {
            get
            {
                return this._imgCat;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._imgCat = value;
            }
        }

        protected virtual UserControl labelArchived
        {
            get
            {
                return this._labelArchived;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelArchived = value;
            }
        }

        protected virtual UserControl labelCategoryDescription
        {
            get
            {
                return this._labelCategoryDescription;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelCategoryDescription = value;
            }
        }

        protected virtual UserControl labelCategoryName
        {
            get
            {
                return this._labelCategoryName;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelCategoryName = value;
            }
        }

        protected virtual UserControl labelHide
        {
            get
            {
                return this._labelHide;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelHide = value;
            }
        }

        protected virtual UserControl labelMessage
        {
            get
            {
                return this._labelMessage;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelMessage = value;
            }
        }

        protected virtual UserControl labelMetaDescription
        {
            get
            {
                return this._labelMetaDescription;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelMetaDescription = value;
            }
        }

        protected virtual UserControl labelMetaKeywords
        {
            get
            {
                return this._labelMetaKeywords;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelMetaKeywords = value;
            }
        }

        protected virtual UserControl labelOrder
        {
            get
            {
                return this._labelOrder;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelOrder = value;
            }
        }

        protected virtual UserControl labelParentCategory
        {
            get
            {
                return this._labelParentCategory;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelParentCategory = value;
            }
        }

        protected virtual UserControl labelSEOName
        {
            get
            {
                return this._labelSEOName;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelSEOName = value;
            }
        }

        protected virtual UserControl labelSEOPageTitle
        {
            get
            {
                return this._labelSEOPageTitle;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._labelSEOPageTitle = value;
            }
        }

        protected virtual ListBox lbCategory
        {
            get
            {
                return this._lbCategory;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                EventHandler handler = new EventHandler(this.lbCategory_SelectedIndexChanged);
                if (this._lbCategory != null)
                {
                    this._lbCategory.SelectedIndexChanged -= handler;
                }
                this._lbCategory = value;
                if (this._lbCategory != null)
                {
                    this._lbCategory.SelectedIndexChanged += handler;
                }
            }
        }

        protected virtual Label lblErrorDelete
        {
            get
            {
                return this._lblErrorDelete;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblErrorDelete = value;
            }
        }

        protected virtual Label lblExtra
        {
            get
            {
                return this._lblExtra;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblExtra = value;
            }
        }

        protected virtual Label lblGeneral
        {
            get
            {
                return this._lblGeneral;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblGeneral = value;
            }
        }

        protected virtual Label lblProducts
        {
            get
            {
                return this._lblProducts;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblProducts = value;
            }
        }

        protected virtual Label lblRecursionWarning
        {
            get
            {
                return this._lblRecursionWarning;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblRecursionWarning = value;
            }
        }

        protected virtual Label lblSEO
        {
            get
            {
                return this._lblSEO;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._lblSEO = value;
            }
        }

        protected virtual UserControl plListAltItemTemplate
        {
            get
            {
                return this._plListAltItemTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plListAltItemTemplate = value;
            }
        }

        protected virtual UserControl plListItemTemplate
        {
            get
            {
                return this._plListItemTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plListItemTemplate = value;
            }
        }

        protected virtual UserControl plProductTemplate
        {
            get
            {
                return this._plProductTemplate;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._plProductTemplate = value;
            }
        }

        protected virtual Panel pnlCategory
        {
            get
            {
                return this._pnlCategory;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._pnlCategory = value;
            }
        }

        protected virtual Panel pnlEdit
        {
            get
            {
                return this._pnlEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._pnlEdit = value;
            }
        }

        protected virtual Panel pnlList
        {
            get
            {
                return this._pnlList;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._pnlList = value;
            }
        }

        protected virtual AdminProductList productlist
        {
            get
            {
                return this._productlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._productlist = value;
            }
        }

        protected virtual PlaceHolder phCatID
        {
            get
            {
                return this._phCatID;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._phCatID = value;
            }
        }

        protected virtual SelectLang selectlang
        {
            get
            {
                return this._selectlang;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                SelectLang.BeforeChangeEventHandler handler = new SelectLang.BeforeChangeEventHandler(this.selectlang_BeforeChange);
                SelectLang.AfterChangeEventHandler handler2 = new SelectLang.AfterChangeEventHandler(this.selectlang_AfterChange);
                if (this._selectlang != null)
                {
                    this._selectlang.BeforeChange -= handler;
                    this._selectlang.AfterChange -= handler2;
                }
                this._selectlang = value;
                if (this._selectlang != null)
                {
                    this._selectlang.BeforeChange += handler;
                    this._selectlang.AfterChange += handler2;
                }
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang
        {
            get
            {
                return this._ShowSelectLang;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang1
        {
            get
            {
                return this._ShowSelectLang1;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang1 = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang2
        {
            get
            {
                return this._ShowSelectLang2;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang2 = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang3
        {
            get
            {
                return this._ShowSelectLang3;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang3 = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang4
        {
            get
            {
                return this._ShowSelectLang4;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang4 = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang5
        {
            get
            {
                return this._ShowSelectLang5;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang5 = value;
            }
        }

        protected virtual NEvoWeb.Modules.NB_Store.ShowSelectLang ShowSelectLang6
        {
            get
            {
                return this._ShowSelectLang6;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._ShowSelectLang6 = value;
            }
        }

        protected virtual HtmlGenericControl tabs
        {
            get
            {
                return this._tabs;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._tabs = value;
            }
        }

        protected virtual TextBox txtCategoryName
        {
            get
            {
                return this._txtCategoryName;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtCategoryName = value;
            }
        }

        protected virtual TextBox txtDescription
        {
            get
            {
                return this._txtDescription;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtDescription = value;
            }
        }

        protected virtual UserControl txtMessage
        {
            get
            {
                return this._txtMessage;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtMessage = value;
            }
        }

        protected virtual TextBox txtMetaDescription
        {
            get
            {
                return this._txtMetaDescription;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtMetaDescription = value;
            }
        }

        protected virtual TextBox txtMetaKeywords
        {
            get
            {
                return this._txtMetaKeywords;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtMetaKeywords = value;
            }
        }

        protected virtual TextBox txtOrder
        {
            get
            {
                return this._txtOrder;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtOrder = value;
            }
        }

        protected virtual TextBox txtSEOName
        {
            get
            {
                return this._txtSEOName;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtSEOName = value;
            }
        }

        protected virtual TextBox txtSEOPageTitle
        {
            get
            {
                return this._txtSEOPageTitle;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._txtSEOPageTitle = value;
            }
        }

        protected virtual CompareValidator validatorOrder
        {
            get
            {
                return this._validatorOrder;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._validatorOrder = value;
            }
        }

        protected virtual RequiredFieldValidator validatorRequireOrder
        {
            get
            {
                return this._validatorRequireOrder;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._validatorRequireOrder = value;
            }
        }

        protected virtual RequiredFieldValidator valReqCategoryName
        {
            get
            {
                return this._valReqCategoryName;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                this._valReqCategoryName = value;
            }
        }
    }
}

